home *** CD-ROM | disk | FTP | other *** search
/ TPUG - Toronto PET Users Group / TPUG Users Group CD / TPUG Users Group CD.iso / AMIGA / AMICUS / AMICUS25.ADF / KeyBird / keybird.doc < prev    next >
Text File  |  1989-01-26  |  17KB  |  287 lines

  1. Keybird--the Keyboard Enhancer.   Version 1.0
  2.   by Michael A. Ingrassia, Amicus/H.V.
  3.  
  4. Keybird is a keyboard enhancer.  It enables you to define (and redefine)
  5. your own keymaps, and is the first keyboard enhancer I know of to enable
  6. you to load any system keymap and make ANY modifications you want.  Here is 
  7. a brief run-through of the program's features.
  8.  
  9. DEFAULT KEYMAP
  10.   When the program starts, a practically useless keymap is preloaded.  
  11. In this keymap (which has no name), no keys are defined.  It is useful
  12. for people who want to start completely from scratch; at any point this
  13. "blank slate" can be reinstated by selecting "New" from the "Keybird
  14. Projects" menu.  But most of us want to tinker with a pre-existing
  15. keymap.  So your first action should be to select "Load Keymap" from the
  16. "Keybird Projects" menu.  The program's default selection for you to load
  17. is "usa2", which is a Dvorak keyboard.  Another possibility, almost surely
  18. in your devs:keymaps directory, is "usa0", the keymap which was standard
  19. under Workbench 1.1.  Unfortunately, the keymap standard for Workbench
  20. 1.2, "usa", is in ROM (or WCS), and so does not usually appear in
  21. devs:keymaps.  This is no problem; the file "Thisisusa" with this 
  22. distribution is actually the usa keymap, as relocated and transcribed from
  23. ROM.  Just make sure it's copied into devs:keymaps before running
  24. keybird.  After loading it, you are ready to start making modifications.
  25.  
  26. CAPSABLE KEYS
  27.   The program starts you on the Capsable Screen. Each physical key has
  28. associated with it in a keymap a bit which makes it either capsable or
  29. not capsable.  The distinction is this:  a capsable key produces a shifted-
  30. character when the Caps Lock key is lit, a noncapsable key does not.
  31. It is important to realize that the Caps Lock key is not the same as a
  32. Shift Lock key!!  For example, the "a" key produces "A" when Caps Lock
  33. is lit, while the "/" key continues to produce "/"--to get "?" you MUST
  34. use a shift key in combination with the "/" key.  On the Capsable Screen,
  35. the status of each key is shown.  In the "usa" keymap, only the alphabetic
  36. characters are capsable--they are shown in RED.  Non-capsable keys are
  37. shown in BLUE.  To change the status of a key, click on the key using
  38. the mouse--its color lightens, to show it is highlighted.  Now click on
  39. the box marked "Make Capsable" or "Make Not Capsable"--watch the color
  40. of the highlighted key change.  
  41.  
  42. REPEATABLE KEYS
  43.   To reach the Repeatable Screen, click on the Repeatable gadget in the
  44. lower left.  Each physical key has associated with it in a keymap a bit
  45. which makes it either repeatable or not repeatable.  A repeatable key
  46. repeats when it is held down sufficiently long; a non-repeatable key must
  47. be re-struck.  For example, in the "usa" keymap the "a" key is repeatable
  48. and the <Return> key is not repeatable.  (To test these assertions, be
  49. sure you are in a situation in which a keymap is being consulted--for
  50. example, in a CLI window, but NOT in the AmigaBasic editor!)  Non-repeatable
  51. keys are shown in BLUE.  Repeatable keys are shown in RED.  To change
  52. the status of a key, select the key by clicking on it, then click on the
  53. "Make Repeatable" or "Make Not Repeatable" gadget and watch the key's
  54. color change.
  55.  
  56. DEADKEYS SCREEN
  57.   To reach the Deadkeys Screen, click on the Deadkeys gadget in the lower
  58. left.  To see what a deadkey is, in a CLI window try typing Alt-f.  The
  59. cursor does not appear to move.  Now type "a". You obtain an accented "a"!
  60. The "usa" keymap has 10 deadkeys: Alt-f, Alt-g, Alt-h, Alt-j, Alt-k,
  61. Alt-F, Alt-G, Alt-H, Alt-J, and Alt-K. Try typing each of them, following
  62. each immediately with the spacebar.  It is important to realize that you
  63. are not actually typing a grave accent (or whatever) when you type a
  64. deadkey.  Rather, the console device remembers that you have typed a
  65. deadkey and outputs no value yet (that's why the cursor doesn't move).
  66. If you now type a MODIFIABLE key, the console device consults the keymap
  67. to find out how to render the particular deadkey-modifiable key
  68. combination.  If instead you followed the deadkey with a non-modifiable
  69. key, the deadkey is discarded and the non-modifiable key is used by itself.
  70. For example, in the "usa" keymap, Alt-j seems to be a tilde.  (Try
  71. Alt-j, <spacebar> in your CLI window.)  Actually, it is a deadkey.
  72. Alt-j followed by <spacebar> gives a tilde because <spacebar> is a
  73. modifiable key, and there is a table in the keymap to show how to render
  74. the Alt-j (deadkey)--<spacebar> (modifiable) combination.  Alt-j followed
  75. by "i" produces just an "i"--because that's the value in the keymap for
  76. the Alt-j (deadkey)--<spacebar> (modifiable) combination.  Alt-j followed
  77. by "m" produces just "m"--because "m" is not a modifiable key and so
  78. the pending Alt-j is discarded when the "m" is struck.  There is no reason
  79. why Alt-j followed by "i" could not give "j"--just define it that way
  80. in keybird!
  81.    Note that while Alt-j is a deadkey, "j" by itself is not.  Whereas
  82. a physical key is either Capsable or not, each particular way of qualifying
  83. a key could give a deadkey or not.  So in the Deadkeys Screen (as also in
  84. the Modifiable Screen and the Keymap Screen, but not in the Capsable
  85. Screen or the Repeatable Screen) the qualifier gadgets in the upper right
  86. of the display are active.
  87.  
  88. QUALIFIERS
  89.    There are four possible qualifiers: Shift, Alt, Control, and Downup.
  90. The first three are straightforward.  Normally both shift keys act the
  91. same, as do both Alt keys.  A "j" key can be qualified in 8 ways by the
  92. 3 keys: you can produce "j" (alone), Shift-j, Alt-j, Shift-Alt-j,
  93. Control-j, Control-Shift-j, Control-Alt-j, and Control-Shift-Alt-j.  Each
  94. of these qualified keys can be mapped to a different code or string.
  95. Downup is a little unusual--the Amiga allows you to assign  different
  96. codes to the up-down transition of a key, the key depress (usual case) and
  97. to the down-up transition of a key, the key release.  In the "usa" keymap,
  98. no keys produce down-up codes.  In the "color" keymap, supplied with
  99. this distribution, the keypad keys produce downup-transitions.  Try 
  100. depressing "1" on the keypad, then WITHOUT RELEASING IT, type a message
  101. with your left hand in the CLI window.  As you type, release the "1" key
  102. on the keypad and see what happens.  Depressing and releasing the "1" key
  103. without typing any intervening letters seems to have no effect.  That's
  104. because the "1" key is actively qualified by the Downup qualifier.  It's
  105. hard to imagine too many uses for the Downup transition--but keybird will
  106. give your imagination full reign to work!
  107.      So the 16 possible qualifier states for a key are:
  108.         alone                           downup
  109.         shift                           downup-shift
  110.         alt                             downup-alt
  111.         shift-alt                       downup-shift-alt
  112.         control                         downup-control
  113.         control-shift                   downup-control-shift
  114.         control-alt                     downup-control-alt
  115.         control-shift-alt               downup-control-shift-alt
  116.      The keyboard reflects the current state of keys AS QUALIFIED BY THE
  117. ACTIVE (RED) QUALIFIERS in the upper right of the display.  For example,
  118. in the Deadkeys Screen, click on the ALT gadget on the upper right.
  119. AL should now be RED (active), and "DO" (=Downup),"CT" (=Control), and
  120. "SH" (=Shift) should be BLUE (inactive).  Assuming we are back to the
  121. "usa" keymap, you will find for example that the "f","g","h","j",and "k"
  122. keys are RED--that's because Alt-f, Alt-g, Alt-h, Alt-j, and Alt-k are
  123. deadkeys.  The "a" key is BLUE--that's because Alt-a is not a deadkey.
  124. The <period> key is BLACK--that's because the <period> key is not
  125. actively qualified by the Alt key.  Alt-period gives a period, true, but
  126. only because the <period> key ignores the Alt qualifier.  In general,
  127. keys on the Deadkeys, Modifiable, and Keymap screens are BLACK if they are
  128. not actively qualified by (separately defined for) the particular
  129. combination of qualifiers displayed in the upper right of the display.
  130. Since the "usa" keymap has no definitions for down-up transitions, for
  131. example, whenever the "DO" gadget in the upper right is active (RED), all
  132. of the keys will be BLACK (inactive).  Only in the Keymap screen can the
  133. status of a key switch from active (red or blue) to inactive (black) or
  134. vice versa.
  135.    Note that at any time (except in the Capsable and Repeatable Screens)
  136. you can change the current qualifier combination you are working with.
  137. There are three ways to do this.  First, you can click on the qualifier
  138. gadgets in the upper right to achieve exactly the combination you want.
  139. Just remember that RED means active, BLUE means inactive.  (Why not
  140. black for inactive? I don't know.) Second, you could instead click on the
  141. "Cycle Qualifiers" gadget in the lower right.  This cycles you through all
  142. 16 combinations of Downup,Control,Alt,Shift on or off.  This is more
  143. convenient than the first method if you just want to see all the
  144. keys under all qualifier combinations, perhaps to locate all the deadkeys
  145. in a given unfamiliar keymap.  However, if you are working with a 
  146. particular key, which has been highlighted (by clicking on it), and that
  147. key is actively qualified by (say) Control only, then you may prefer
  148. the Third method: click on the "Cycle Active Qualifiers" gadget in the
  149. lower right.  This will take you through only those qualifier combinations
  150. which are separately defined in the keymap for the highlighted key.
  151. For example, in the "usa" keymap the <return> key is active only with
  152. the Control qualifier.  Shift-return is the same as <return>, because
  153. the shift qualifier is ignored.  To define shift-return as something new,
  154. you would have to first create a space for a separate definition of
  155. shift-return, by making shift-return active, then create your definition.
  156.    Note that it is possible to redefine the shift key, for example,
  157. by making it active and then giving a definition for it!  Then, every time
  158. you hit the shift key, you would get your new code as well as the codes
  159. for any keys you qualify with the shift key by depressing at the same time.
  160.  
  161. MODIFIABLE SCREEN
  162.    Modifiable (qualified) keys are RED.  Non-modifiable keys are BLUE.
  163. Non-active keys are BLACK.  In the "usa" keymap, there are 15 modifiable
  164. keys: "a", "e", "i","o","u","y","n",<spacebar>,Shift-a, Shift-e, Shift-i,
  165. Shift-o, Shift-u, Shift-y, Shift-n .  Each of these keys can be given
  166. a separate definition for every deadkey.  To make an active key modifiable
  167. or non-modifiable, click on it with the mouse and then click on the
  168. "Make Modifiable" or "Make Not Modifiable" gadget.
  169.    Exercise: define Shift-return to be a deadkey (after making it active),
  170. and define Shift-spacebar to be a modifiable key (after making it active).
  171. Shift-return followed by Shift-spacebar should give "j".
  172.  
  173. KEYMAP SCREEN
  174.   Active keys are RED or BLUE.  Inactive keys are BLACK.  To make a key
  175. active, highlight it by clicking on it with the mouse, then click on the
  176. "Make Active" gadget.  To make a key inactive, highlight it by clicking
  177. on it with the mouse, then click on the "Make Not Active" gadget.  But note
  178. that if the current qualifier state is Control-Shift, say, as determined
  179. by checking the gadgets in the upper right ("DO" and "AL" blue, "CO" and
  180. "SH" red), then it is impossible to make a key inactive because keybird
  181. doesn't know whether you want to eliminate the possibility of Control
  182. affecting your key or the possibility of Shift affecting your key. (If
  183. Control and Shift each separately affect your key, you MUST provide a
  184. definition for the Control-Shift combination).
  185.    A key is normally red if some qualification of that key produces a
  186. string; blue if all qualifications of the key produce a single byte.
  187.  
  188. IMPORTANT NOTE
  189.    Because of a limitation in the keymap definition, any key which
  190. controls a deadkey or a modifiable key MUST be defined to produce only
  191. a single byte, no matter how it is qualified.  For example, in the "usa"
  192. keymap, we cannot redefine the "f" key to give the string "filenote",
  193. even though the "f" key is an ordinary key, because there is a qualification
  194. of the "f" key, namely Alt-f (or Shift-Alt-f),  which is a deadkey.
  195.  
  196. DEFINING KEYS
  197.    Subject to the limitation noted above, a key can be redefined in any
  198. Screen (Capsable, Repeatable, Deadkeys, Modifiable, Keymap), except that
  199. qualified keys cannot be redefined in the Capsable or Repeatable Screens
  200. because there the qualifier combination is always taken to be "alone".
  201. To redefine it, just type your proposed new definition on the keyboard.
  202. It appears in the text box next to the label "New:".  To enter the
  203. definition into the keymap you are building, type <return>.  The 
  204. <Backspace> key (or Control-H) is active so you can correct your
  205. definition if you make a mistake.  
  206.    Most control-keys can be entered by typing the control-combination
  207. itself.  So, to enter Control-a, just type Control-a.  There are two
  208. obvious exceptions: Control-h is active as a backspace and Control-m
  209. as a return.  Control-C is NOT an exception.  There is a non-obvious
  210. exception--Control-S suspends the program.  Type any other key to wake
  211. the program up.  This can be very mysterious!  Note that Control-a
  212. appears in the textbox as a BLUE "A".  Grey letters are non-control
  213. characters; blue letters are control characters (codes in the range 0-31).
  214. A string of characters should be 32 characters or fewer in length.
  215. The "blue" convention enables us to guarantee to be able to display all
  216. 32 characters no matter how many imbedded control characters there are.
  217.    To type a high control character (codes in the range 128-159), type
  218. the <help> key and then type an alphabetic character.  For example,
  219. <help> followed by "a" gives High-Control-a (Control-a with high bit set).
  220. <help> can be combined with "@","[","]","\" in addition to alphabetic
  221. characters.  High-control-characters show up in RED.
  222.   In sum: Control-characters are in BLUE.
  223.           High-Control-characters are in RED.
  224.           Ordinary characters are in GREY.
  225.   Oh yes--if you want a Control-S, type <help> followed by ( with) Shift-S.
  226.   To get Control-M,                type <help> followed by         Shift-m.
  227.   To get Control-H,                type <help> followed by         Shift-h.
  228.   To get Control-C,                type Control-C or
  229.                                    type <help> followed by         Shift-c.
  230.   Exercise: redefine Alt-d to be the string "dir^M" so that typing
  231. Alt-d at a CLI prompt will automatically give you a directory.
  232.  
  233. SAVING YOUR KEYMAP
  234.   Just select "Save" from the "Keybird Projects" menu and follow
  235. directions.   You get an icon with your keymap which you can delete from
  236. the CLI later, as it is useless.
  237.  
  238. INSTALLING YOUR KEYMAP
  239.   Suppose your keymap has been saved to devs:keymaps under the name "foo".
  240. Then the CLI command "setmap foo" will install your keymap.  Any program
  241. launched from this CLI which normally inherits the "usa" keymap from the
  242. CLI will now inherit "foo" instead. Alternatively, you can double click
  243. on the "setmap" icon (in the System drawer of your Workbench disk"
  244. after setting "keymap=foo" in the Tools line of the display obtained by
  245. selecting the "setmap" icon and choosing the "Info" option from the
  246. Workbench menu.
  247.  
  248. RESOURCES
  249.    Please note that a keymap is a resource.  That is, once installed, the
  250. system expects it not to change.  Suppose you create "foo", save it,
  251. install it, then notice that you forgot to redefine some key.
  252. You re-enter keybird, load "foo", change it, save it back to devs:keymaps,
  253. and reinstall it, only to find no apparent change from the earlier version.
  254. That is because the system responds to your second attempt to install "foo",
  255. in effect, by saying "Hmmm...I don't need to load "foo" from devs:keymaps
  256. because I've already got a "foo" in memory and one "foo" is as good as
  257. another."  This will happen even if you try the sequence "setmap usa" and
  258. then "setmap foo", because the system is very tenacious about holding on
  259. to resources.  "No sense dumping this "foo" keymap I've got in memory, even
  260. though nobody's using it anymore, because somebody may want it later--son of
  261. a gun, sure enough, here's somebody who wants "foo" again!"  It is pretty
  262. easy (although I haven't done it) to write a quicky program to flush the
  263. system of all keymaps not in use--or you could just rename your works in
  264. progress "foo1","foo2", etc.
  265.  
  266. DISTRIBUTION
  267.    This version 1.0 is fairly clunky, because it was developed in and still
  268. runs in interpreted basic.  Anyone interested in seeing improvements to the
  269. the program, including but not limited to compilation or rewrite in "c",
  270. and elimination of remaining bugs,  is invited to write (or send money) to
  271.       Michael A. Ingrassia
  272.       Dept. of Mathematics and Computer Science
  273.       SUNY--College at New Paltz
  274.       New Paltz, NY 12561
  275. The program is copyright (c) 1987 by Michael A. Ingrassia, Amicus/HV.  All
  276.     rights reserved.
  277. Licensed for non-commercial distribution (freeware).
  278. Please feel free to share the program as much as you want.  If you 
  279. modify it, please send me notice of your modifications and do not remove
  280. the original copyright notice.
  281.  
  282.  
  283.  
  284.  
  285.  
  286.  
  287.